Systems and methods for detecting vehicle tailgating

ABSTRACT

A device may obtain video data associated with a driving event involving a first vehicle. The device may determine a vanishing point associated with the video data and may construct a cone of impact of the first vehicle based on the vanishing point. The device may detect a second vehicle within the cone of impact and may analyze the subset of video frames to determine a distance between the first vehicle and the second vehicle. The device may determine a speed of the first vehicle during a time period associated with a subset of video frames. The device may determine a headway score, representative of a severity associated with the first vehicle being within a proximity threshold of the second vehicle during the time period, based on the distance and the speed. The device may determine an occurrence of a tailgating event based on the headway score.

BACKGROUND

A dashboard camera can be mounted to a vehicle to capture video datarelated to the vehicle, a road the vehicle is traveling on, a path ofthe vehicle on the road, one or more objects on the road and/or in thepath of the vehicle, and/or the like. Other sensor devices may beattached to or incorporated into the vehicle to capture data, such as aspeedometer, an accelerometer, a location sensor, a steering anglesensor, and/or the like.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an example implementation described herein.

FIGS. 2A-2C are diagrams of one or more example implementationsdescribed herein.

FIG. 3 is a diagram illustrating an example of training and using amachine learning model in connection with detecting tailgating by avehicle.

FIG. 4 is a diagram of an example environment in which systems and/ormethods described herein may be implemented.

FIG. 5 is a diagram of example components of one or more devices of FIG.4.

FIG. 6 is a flow chart of an example process relating to detectingtailgating by a vehicle.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The following detailed description of example implementations refers tothe accompanying drawings. The same reference numbers in differentdrawings may identify the same or similar elements.

While driving a vehicle, a driver can experience an unsafe drivingevent, such as a tailgating event, a harsh braking event, a quick startevent, a cornering event, a crash event, a near-crash event, an off-roadevent, and/or the like. For example, when a driver travels too closelyto a vehicle traveling in front of the driver, the driver may experiencea tailgating event.

In some circumstances, the unsafe driving event may be termed asafety-critical event and may create a dangerous situation for bothdrivers, both vehicles, and/or other people and property. However, thedriver might not be aware that their unsafe maneuvers may lead to anunsafe driving event. Moreover, fleet managers who employ numerousdrivers might not know whether the drivers exhibit unsafe maneuverbehavior and/or create unsafe driving events.

Some implementations described herein may relate to a vehicle monitoringsystem that is capable of collecting video data and/or telematics dataassociated with a driving event and a vehicle proximity analysis systemthat is capable of identifying the driving event as an unsafe drivingevent (e.g., a tailgating event) based on the video data and/or thetelematics data. For example, the vehicle proximity analysis system mayobtain video data and telematics data associated with a driving eventinvolving a first vehicle from a vehicle monitoring system. The vehicleproximity analysis system may construct a cone of impact associated withthe first vehicle based on a set of video frames included in the videodata. The vehicle proximity analysis system may detect a second vehiclewithin the cone of impact in the set of video frames. The vehicleproximity analysis system may analyze the set of video frames todetermine a distance between the first vehicle and the second vehicle inthe set of video frames. The vehicle proximity analysis system maydetermine a speed of the first vehicle during a time period associatedwith the set of video frames. The vehicle proximity analysis system maydetermine a headway score based on the distance and the speed. Theheadway score may be representative of a severity associated with thefirst vehicle tailgating the second vehicle during the time period. Insome implementations, the headway score may represent a travel timeneeded given the current speed of the first vehicle to reach a currentlocation of the second vehicle. The vehicle proximity analysis systemmay provide the headway score to a client device associated with thefirst vehicle, a driver of the first vehicle, an organization associatedwith the first vehicle, and/or the like.

In this way, implementations described herein can alert fleet managersand/or drivers of unsafe driving events and unsafe maneuvers associatedtherewith and/or provide tools for reviewing unsafe maneuvers after theunsafe driving events occur. Implementations described herein mayprovide drivers with information that can be used to change drivingbehavior (e.g., by enabling the drivers to recognize and avoid unsafemaneuvers). Similarly, implementations described herein can allow thefleet managers to create safe driving training materials and/orguidelines, which may prevent or reduce the frequency of unsafemaneuvers and of resulting unsafe driving events in the future.Preventing or reducing the frequency of unsafe maneuvers and ofresulting unsafe driving events may result in the increased safety ofthe drivers, the vehicles that the drivers operate, and other people andproperty. Further, preventing or reducing the frequency of unsafemaneuvers and of resulting unsafe driving events, may also result inless wear-and-tear on the vehicles or vehicle components, which mayreduce costs associated with maintaining the vehicles.

Furthermore, implementations described herein are automated and maycapture and process numerous (e.g., hundreds, thousands, millions,billions, and/or the like) data points to detect numerous unsafe drivingevents at the same time. This can improve speed and efficiency of theprocess and conserve computing resources (e.g., processor resources,memory resources, communication resources, and/or the like) of thevehicle monitoring system, the vehicle proximity analysis system, and/orthe client device.

Furthermore, implementations described herein use a rigorous,computerized process to perform tasks or roles that were not previouslyperformed or were previously performed using subjective human intuitionor input. Additionally, implementations described herein conservecomputing resources that would otherwise be wasted in attempting toassist a human in collecting information concerning an unsafe maneuverand/or classifying the unsafe maneuver by hand.

FIG. 1 is a diagram of an example implementation 100 described herein.As shown in FIG. 1, example implementation 100 includes a vehiclemonitoring system 101 that can be used by a vehicle. In someimplementations, the vehicle monitoring system 101 includes a cameradevice, a mobile device, a vehicle tracking unit device, and/or asimilar device that is capable of capturing data concerning a drivingevent, an unsafe maneuver, and/or the like. In some implementations, thevehicle monitoring system 101 determines that an unsafe maneuver (e.g.,a harsh braking event, a quick start event, a cornering event (e.g.,making a turn at an unsafe speed), a crash event, a near-crash event, anoff-road event, and/or the like) has occurred and collects video dataconcerning the driving event based on the occurrence of the unsafemaneuver.

In some implementations, the vehicle monitoring system 101 is includedin the vehicle. For example, a component of the vehicle monitoringsystem 101 may be mounted and/or affixed to the vehicle (e.g., on adashboard of the vehicle, on a windshield of the vehicle, and/or thelike). Alternatively, and/or additionally, the vehicle monitoring system101 may be included in a device associated with the vehicle. Forexample, the vehicle monitoring system 101 may be included in a mobiledevice of a driver of the vehicle, a mobile device of a passenger of thevehicle, and/or the like.

In some implementations, the vehicle monitoring system 101 includes acamera (e.g., a dashboard camera, sometimes referred to as a “dash cam,”a video camera, and/or the like). In some implementations, the camera ismounted and/or affixed to the vehicle such that the camera is pointed ina direction in which the vehicle is traveling. In some implementations,the camera captures video data (e.g., records the video data and storesthe video data) concerning the vehicle, the trajectory of the vehicle, aroad on which the vehicle is traveling, one or more objects on and/ornear the road (e.g., other vehicles, sign posts, guard rails, roaddebris, people, animals, and/or the like), and/or the like. For example,the camera may capture a plurality of video frames, where one videoframe includes information for a specific moment in time. In someimplementations, the video data has a frame rate (e.g., a quantity ofvideo frames per second). In some implementations, the vehiclemonitoring system 101 includes one or more cameras that are front-facing(e.g., pointed to the front of the vehicle), rear-facing (e.g., pointedto the back of the vehicle), and/or side-facing (e.g., pointed to theside of the vehicle), and/or the like.

In some implementations, the vehicle monitoring system 101 includes atelematics sensor that obtains telematics data. For example, the vehiclemonitoring system 101 may include an accelerometer that collects dataconcerning acceleration and/or deceleration of the vehicle (e.g., anacceleration rate, an acceleration direction, a maximum acceleration, astart time of an acceleration event, and/or the like). Additionally, oralternatively, the vehicle monitoring system 101 may include a globalpositioning system (GPS) sensor that collects data concerning a positionof the vehicle. For example, the data concerning the position of thevehicle may include a location of the vehicle (e.g., represented as alatitude and longitude pair), a time of the location of the vehicle(e.g., when the vehicle is at the location), a direction of the vehicle(e.g., which way the vehicle is pointing, such as in degrees away fromnorth, where north is represented by zero degrees), a distance from alast recorded location of the vehicle, and/or the like.

In some implementations, the vehicle monitoring system 101 includes acommunication component. For example, the vehicle monitoring system 101may include a wireless communication device to facilitate communicationbetween the vehicle monitoring system 101 and one or more other devices.The communication component may transmit the video data, telematics data(e.g., data concerning an acceleration/deceleration of the vehicle, dataconcerning a position of the vehicle, and/or the like), and/or the liketo the one or more other devices.

As an example, as shown in FIG. 1, the vehicle may use a camera device,such as a smart dashboard camera, as the vehicle monitoring system 101(where the camera device includes the camera), the telematics sensor(which includes the accelerometer and the GPS sensor), and thecommunication component. As another example, the vehicle may use amobile user device (such as a cellular phone) as the vehicle monitoringsystem 101 (where the mobile user device includes the camera), thetelematics sensor (which includes the accelerometer and the GPS sensor),and the communication component.

In a further example, as shown in FIG. 1, the vehicle monitoring system101 of the vehicle may comprise a camera device (such as a basicdashboard camera) and a vehicle tracking unit device. The camera devicemay include the camera. The vehicle tracking unit device may include thetelematics sensor (which includes the accelerometer and the GPS sensor)and the communication component. In some implementations, the vehicletracking unit device is an internal component of the vehicle. In someimplementations, the camera device and the vehicle tracking unit devicecommunicate with each other to share information (e.g., by a wirelessand/or wired connection).

In an additional example, the vehicle monitoring system 101 of thevehicle may comprise a vehicle tracking unit device and a mobile userdevice. In some implementations, the vehicle tracking unit deviceincludes the GPS sensor and a first communication component, and themobile user device includes the camera, the accelerometer, and a secondcommunication component. In some implementations, the vehicle trackingunit device does not directly communicate with the mobile user device.In these implementations, the vehicle tracking unit device and themobile user device may transmit, respectively, data to the one or moreother devices via the first communication component of the vehicletracking unit device and the second communication component of themobile user device.

As further shown in FIG. 1, the communication component of the vehiclemonitoring system 101 may communicate with a vehicle proximity analysissystem 102. For example, the vehicle monitoring system 101 may providestored or real-time data regarding operation of a vehicle for processingby the vehicle proximity analysis system 102. In some implementations,the vehicle proximity analysis system 102 includes a computer visionmodel, a tailgate detection model, and/or the like. For example, asdescribed in more detail herein, the vehicle proximity analysis system102 may perform path analysis, object detection, and/or the like onvideo data captured by a camera of the vehicle monitoring system 101 by,in some implementations using the computer vision model. The computervision model may include an object detection model that analyzes a videoframe of the video data to detect a vehicle depicted in the video frame.The object detection model may output a bounding box that includes avehicle depicted in the video frame and a category (e.g., a car, a bus,a truck, and/or the like) of the detected video as a result.Additionally, or alternatively, the vehicle proximity analysis system102 may use other techniques to analyze data captured by one or moresensors of the vehicle monitoring system 101.

Based at least in part on telematics data, results of processing usingthe computer vision model, and/or the like, the vehicle proximityanalysis system 102 may use a tailgate detection model to determinewhether a driving event is to be classified as a tailgating event (e.g.,a vehicle traveling within a proximity threshold of another vehicle fora period of time), as described herein. Using machine learning models toanalyze video data and telematics data may enable driving eventclassification with a reduced set of sensors and/or with reduced cost(e.g., lower-fidelity, inexpensive) sensors relative to other techniquesthat use extensive sensor data to determine driving parameters of avehicle and classify driving events associated therewith.

As indicated above, FIG. 1 is provided as an example. Other examples maydiffer from what is described with regard to FIG. 1. The number andarrangement of devices shown in FIG. 1 are provided as an example. Inpractice, there may be additional devices, fewer devices, differentdevices, or differently arranged devices than those shown in FIG. 1.Furthermore, two or more devices shown in FIG. 1 may be implementedwithin a single device, or a single device shown in FIG. 1 may beimplemented as multiple, distributed devices. Additionally, oralternatively, a set of devices (e.g., one or more devices) shown inFIG. 1 may perform one or more functions described as being performed byanother set of devices shown in FIG. 1.

FIGS. 2A-2C are diagrams of one or more example implementations 200described herein. As shown in FIGS. 2A-2C, example 200 includes avehicle monitoring system 101, a vehicle proximity analysis system 102,a video storage device 202, and a client device 204.

As shown in FIG. 2A, and by reference number 252, a telematics sensordetermines that a driving event has occurred. The driving event mayinclude any type of action related to the operation of the vehicle. Forexample, the driving event may include starting the vehicle, shiftingthe vehicle into a drive gear, the vehicle traveling along a roadway,braking, turning, accelerating, changing lanes, activating a turnsignal, and/or the like.

In some implementations, the telematics sensor determines that a harshdriving event has occurred. For example, the telematics sensor canprocess data concerning the acceleration/deceleration of the vehicle(e.g., a rapid increase in the acceleration of the vehicle, a rapiddecrease in the acceleration of the vehicle, the acceleration of thevehicle satisfies a threshold, the acceleration direction of the vehiclesuddenly changes, and/or the like) to determine that the harsh drivingevent has occurred. For example, the vehicle monitoring system 101 maydetermine that a speed of the vehicle decreases by more than a thresholdamount during an amount of time, that the speed of the vehicle increasesby more than a threshold amount during an amount of time, and/or thelike.

Additionally, or alternatively, the telematics sensor can detect, via anaccelerometer, a sudden decrease in an acceleration of the vehicle(e.g., the acceleration of the vehicle decreases by more than athreshold amount during an amount of time) and determine that a harshdriving event (e.g., a hard braking event) has occurred. In this case,based at least in part on a determination that a harsh driving event hasoccurred, vehicle monitoring system 101 may trigger a determination ofwhether a tailgating event preceded the harsh driving event.

Additionally, or alternatively, vehicle proximity analysis system 102and/or vehicle monitoring system 101 may determine that a driving eventhas occurred and may be triggered to detect whether a tailgating eventhas occurred based on the occurrence of the driving event and/or basedon another type of trigger. For example, vehicle monitoring system 101may receive other sensor data, such as data from a collision sensor, anaudio sensor, an output of a machine learning model processing videodata from a camera, one or more sensors of, for example, a mobile device(e.g., an accelerometer, a location sensor, an audio sensor, agyroscope, etc.), and/or the like and may detect a driving event basedon the other sensor data. Additionally, or alternatively, vehiclemonitoring system 101 may detect a user interaction with a button, auser interaction with a user interface, a voice command, and/or thelike, which vehicle monitoring system 101 may interpret as a trigger fordetecting whether a tailgating event has occurred.

As shown by reference number 254, a camera of the vehicle monitoringsystem 101 collects video data regarding the driving event. For example,the camera, may continuously capture video data (e.g., record the videodata and cache the video data). The camera may receive an indication ofthe driving event from the telematics sensor and may store cached videodata for further analysis. In some implementations, the indication mayinclude information identifying a start time of the driving event, anend time of the driving event, and/or the like. The camera may storevideo data that was captured during the driving event, for a thresholdamount of time before the driving event (e.g., to capture a potentialunsafe maneuver leading to a harsh driving event), for a thresholdamount of time after the driving event (e.g., to capture a result of aharsh driving event, such as a collision or near-collision), and/or thelike. In this way, the camera may collect the video data for a period oftime that shows what happened prior to the driving event and after thedriving event.

As shown by reference number 256, a camera sends the video data to acommunication component and the telematics sensor sends accelerationdata and/or position data to the communication component. For example,the camera may send video data regarding the driving event to thecommunication component for transmission. The telematics sensor may sendtelematics data, such as the data concerning acceleration/decelerationof the vehicle, the data concerning the position of the vehicle, and/orthe like, to the communication component. As shown by reference number258, the communication component sends the video data, the accelerationdata, and/or the position data to the video storage device 202, thevehicle proximity analysis system 102, and/or the client device 204.

As shown in FIG. 2B, and by reference number 260, the vehicle proximityanalysis system 102 obtains video data and telematics data concerningthe driving event. For example, the telematics sensor may determine thata driving event has occurred in a manner similar to that described abovewith respect to FIG. 2A. The vehicle proximity analysis system 102 mayobtain the video data and/or the telematics data from the vehiclemonitoring system 101 and/or the video storage device 202 based ondetermining that the driving event has occurred.

In some implementations, the video data and/or the telematic data areobtained based on the vehicle monitoring system 101 detecting anoccurrence of a harsh driving event. The vehicle monitoring system 101may detect the occurrence of the harsh driving event based on the videodata, the telematic data, a user input provided via a user interfaceassociated with the vehicle monitoring system 101, sensor data obtainedfrom another device, and/or the like. The vehicle monitoring system 101may provide the video data and the telematic data to the vehicleproximity analysis system 102 based on detecting the occurrence of theharsh driving event. Additionally, and/or alternatively, the vehicleproximity analysis system 102 may obtain the video data periodically(e.g., every hour, every day, every week, and/or the like), based onproviding a request to the vehicle monitoring system 101, and/or thelike.

In some implementations, the vehicle proximity analysis system 102obtains the video data and/or the telematics data based on a messagereceived from the vehicle monitoring system 101. In someimplementations, the message includes a link (e.g., a uniform resourcelink (URL)) to the video data stored at the video storage device 202. Insome implementations, the vehicle proximity analysis system 102 maydownload the video data via the link from the video storage device 202.In some implementations, the message includes the data concerningacceleration/deceleration of the vehicle and/or the data concerning theposition of the vehicle. In some implementations, the vehicle proximityanalysis system 102 identifies the vehicle and the driving event basedon the data concerning acceleration/deceleration of the vehicle and/orthe data concerning the position of the vehicle.

In some implementations, the vehicle proximity analysis system 102obtains the video data from the vehicle monitoring system 101 and/or thevideo storage device 202 without having to download the video data via alink from the video storage device 202. For example, vehicle monitoringsystem 101 and/or the video storage device 202 may send the video datato the vehicle proximity analysis system 102 (e.g., push the video datato the vehicle proximity analysis system 102) without the vehicleproximity analysis system 102 having to request the video data.

As shown by reference number 262, the vehicle proximity analysis system102 identifies one or more objects in the video data. The vehicleproximity analysis system 102 may process each video frame, of theplurality of video frames, to identify respective objects depicted inthe plurality of video frames. In some implementations, the vehicleproximity analysis system 102 uses an object detection algorithm toidentify a vehicle (referred to herein as the second vehicle) in a videoframe. For example, the vehicle proximity analysis system 102 mayprocess the video frame using a convolutional neural network todetermine the second vehicle, a bounding box that includes the secondvehicle, and/or a category of the second vehicle (e.g., a car, a truck,a motorcycle, and/or the like).

In some implementations, the vehicle proximity analysis system 102utilizes a machine learning model (e.g., the computer vision model) toidentify the one or more objects in the video data. The computer visionmodel may be trained based on data relating to video frames depictingvehicles and data relating to a location of the vehicles in the videoframes and a type or classification associated with the vehicles. Thecomputer vision model may be trained to identify one or more vehicles inthe video frames and a confidence score that reflects a measure ofconfidence that the vehicle is depicted in the video frame. In someimplementations, the vehicle proximity analysis system 102 trains thecomputer vision model in a manner similar to that described below withrespect to FIG. 3.

As shown by reference number 264, the vehicle proximity analysis system102 constructs a cone of impact of the vehicle. The cone of impact maybe an ideal extension of a lane of a road in which the vehicle istraveling. The cone of impact may include all points of the road lyingalong a path of the vehicle that will be presumably encountered by thevehicle along the vehicle's trajectory. Stated differently, the cone ofimpact may be the area of the video frame that represents a path alongwhich the vehicle will travel given the vehicle's trajectory in thevideo frame.

In some implementations, the vehicle proximity analysis system 102 mayconstruct the cone of impact of the vehicle for the video frame based ondetermining a vanishing point associated with the video data. In someimplementations, the vehicle proximity analysis system 102 uses anobject tracking algorithm to determine the vanishing point associatedwith the video data. The object tracking algorithm may utilize thebounding boxes determined by the object detection algorithm to determinea trajectory of the vehicles included in the bounding boxes.

The vehicle proximity analysis system 102 may determine the four cornersof a bounding box that includes a vehicle depicted in the video frame.The vehicle proximity analysis system 102 may compute a trajectoryassociated with each corner of the bounding box. The vehicle proximityanalysis system 102 may determine an intersection point of thetrajectories determined for the corners of the bounding box. The vehicleproximity analysis system 102 may determine a candidate vanishing pointfor the vehicle in the bounding box corresponding to the intersectionpoint of the trajectories of the corners of the bounding box.

In some implementations, the vehicle proximity analysis system 102determines a confidence score associated with the candidate vanishingpoint. The confidence score may be determined based on the intersectionof the trajectories of the corners of the bounding box. The vehicleproximity analysis system 102 may associate the candidate vanishingpoint with a first confidence score when the trajectories of the cornersof the bounding box intersect at single point. The vehicle proximityanalysis system 102 may determine a second, lower confidence score whenthe trajectories intersects at multiple points.

The vehicle proximity analysis system 102 may determine a candidatevanishing point and/or a confidence score for each of a plurality ofvehicles depicted in the video data in a manner similar to thatdescribed above. The vehicle proximity analysis system 102 may determinea vanishing point associated with the video data based on the candidatevanishing points and/or confidence scores. For example, the vehicleproximity analysis system 102 may weight each candidate vanishing pointbased on the confidence score associated with the candidate vanishingpoint. The vehicle proximity analysis system 102 may determine thevanishing point for the video data based on the weighted vanishingpoints.

The cone of impact may be a triangular area of the video frame havingthe vanishing point as a vertex and a portion of a bottom of the videoframe as a side. The bottom of the video frame may be an edge of thevideo frame having side vertices positioned symmetrically left and rightwith respect to the x-coordinate of the vanishing point. Additionally,and/or alternatively, the bottom of the video frame may be selectedbased on a horizontal inclination of the video frame and/or the heightat which the camera is mounted.

In some implementations, a length of the portion of the bottom of thevideo frame may be a fixed length (e.g., one-half a length of the bottomof the video frame, one-third a length of the bottom of the video frame,and/or the like). In some implementations, the length of the portion ofthe bottom of the video frame may be determined based on one or morevariables such as, a height at which the camera is mounted on thevehicle, a size of the second vehicle in the video frame, based on awidth of a lane of a road, and/or the like.

In some implementations, the vehicle proximity analysis system 102determines the vanishing point based on computing an optical flowassociated with the video data. In some implementations, the vehicleproximity analysis system 102 uses an optical flow algorithm to computethe optical flow associated with the video data. For example, thevehicle proximity analysis system 102 may process the video frame usingFarneback's algorithm to compute the optical flow of the video frame.The optical flow may be the apparent direction of each pixel from onevideo frame to a next video frame. The optical flow algorithm maycombine all the directions to estimate the point towards with thevehicle motion is directed. The vehicle proximity analysis system 102may determine the vanishing point based on the point towards with thevehicle motion is directed.

In some implementations, the vehicle proximity analysis system 102 usesa vanishing point algorithm to determine the vanishing point of thevideo frame. For example, the vehicle proximity analysis system 102 mayprocess the video frame using a random sample consensus (RANSAC)algorithm to determine the vanishing point of the video frame.

As shown by reference number 266, the vehicle proximity analysis system102 identifies a second vehicle in the cone of impact. In someimplementations, the vehicle proximity analysis system 102 determinesthat a second vehicle is within the cone of impact based the boundingbox of the second vehicle. The vehicle proximity analysis system 102 mayidentify a lowest edge of the bounding box relative to the other edgesof the bounding box. The vehicle proximity analysis system 102 maydetermine a center point of the lowest edge of the bounding box. Thevehicle proximity analysis system 102 may determine whether the centerpoint is within the cone of impact. The vehicle proximity analysissystem 102 may determine that the second vehicle in the bounding box isin the cone of impact when the center point is within the cone ofimpact. The vehicle proximity analysis system 102 may determine that thesecond vehicle is not within the cone of impact when the center point isnot within the cone of impact.

In some implementations, the video frame may depict multiple secondvehicles within the cone of impact. The vehicle proximity analysissystem 102 may determine that the second vehicle in the bounding boxhaving the lowest bottom edge is directly in front of the vehicle forwhich the driving event was detected. The vehicle proximity analysissystem 102 may process each video frame, of the plurality of videoframes included in the video data, in a manner similar to that describedabove.

In some implementations, the vehicle proximity analysis system 102utilizes a machine learning model (e.g., the tailgate detection model)to detect the second vehicle within the cone of impact in the subset ofvideo frames. In some implementations, the vehicle proximity analysissystem 102 trains the tailgate detection model to detect a secondvehicle within a cone of impact in a subset of video frames. Thetailgate detection model may be trained based on data relating to videoframes depicting vehicles and data relating to whether the secondvehicles are within a cone of impact. For example, the tailgatedetection model may be trained by processing the video data andutilizing a result of the analysis performed to detect the secondvehicle within the cone of impact described above as ground truth. Thetailgate detection model may be trained to detect a second vehiclewithin a cone of impact and a confidence score that reflects a measureof confidence that the vehicle is within the cone of impact. In someimplementations, the vehicle proximity analysis system 102 trains thetailgate detection model in a manner similar to that described belowwith respect to FIG. 3.

As shown by reference number 268, the vehicle proximity analysis system102 determines a distance to the vehicle in the cone of impact. belowwith respect to FIG. 3.

In some implementations, the vehicle proximity analysis system 102determines the distance to the second vehicle in the cone of impactgeometrically. The vehicle proximity analysis system 102 may determine aset of parameters associated with the camera. For example, the vehicleproximity analysis system 102 may determine a focal length of thecamera, a level of a horizon within the video frame, a height of thecamera with respect to the ground, and/or the like. The vehicleproximity analysis system 102 may determine the set of parameters basedaccessing a data structure storing the set of parameters, based on auser inputting the set of parameters via a user interface associatedwith the vehicle proximity analysis system 102, and/or the like.

In some implementations, the vehicle proximity analysis system 102 maycalculate one or more of the set of parameters based on a size of thevehicle. The vehicle proximity analysis system 102 may determine alocation at which the camera is mounted on the vehicle, such as adashboard, a fender, and/or the like. The vehicle proximity analysissystem 102 may determine a type of the vehicle based on the output ofthe object detection algorithm. The vehicle proximity analysis system102 may determine a size of the vehicle (e.g., a height of the fender, aposition of the windshield, and/or the like) based on the type of thevehicle. For example, the vehicle proximity analysis system 102 maydetermine the size of the vehicle based on accessing a data structurestoring information associated with the sizes of various types ofvehicles. The vehicle proximity analysis system 102 may determine aheight of the camera with respect to the ground based on the position ofthe camera on the vehicle and the size of the vehicle (e.g., a height ofthe fender when the camera is mounted on a fender of the vehicle, aheight of a bottom of the windshield when the camera is mounted on adashboard of the vehicle, and/or the like).

In some implementations, the vehicle proximity analysis system 102 mayrectify the video frame. The vehicle proximity analysis system 102 mayrectify the video frame by rotating the video frame around a horizontalaxis until a horizon level of the video frame is brought exactly at halfof a height of the video frame. The vehicle proximity analysis system102 may determine the distance to the second vehicle by dividing aproduct of the focal length and the camera height by a distance fromhorizon in the rectified video frame plane.

In some implementations, the vehicle proximity analysis system 102utilizes a machine learning model (e.g., a depth analysis model) todetermine the distance between the vehicle and the second vehicle. Thedepth analysis model may include a deep learning model, a regressionmodel, and/or the like.

In some implementations, the vehicle proximity analysis system 102trains the depth analysis model to determine the distance between afirst vehicle and a second vehicle in a set of frames. The depthanalysis model may be trained based on a set of training data thatincludes video frames depicting vehicles and data relating to a distancebetween the depicted vehicles in the video frames. The depicted vehiclesmay be a same type of vehicle and/or a different type of vehicle as thevehicle. The depth analysis model may be trained to determine a distancebetween vehicles depicted in a video frame and a confidence score thatreflects a measure of confidence that the distance is accurate. In someimplementations, the vehicle proximity analysis system 102 trains thedepth analysis model in a manner similar to that described

In some implementations, the vehicle proximity analysis system 102utilizes a pinhole camera model to determine the distance to the secondvehicle in the cone of impact. The pinhole camera model may be acomputer vision model for describing the mathematical relationshipbetween the coordinates of a point in three-dimensional space and theprojection of the point onto the image plane of a camera (e.g., thevideo frame). The vehicle proximity analysis system 102 may provide theset of parameters and the video frame to the pinhole camera model as aninput and the pinhole camera model may output information indicating thedistance to the second vehicle as a result.

In some implementations, the vehicle proximity analysis system 102utilizes a regression model to determine the distance to the secondvehicle in the cone of impact. The regression model may determine thedistance to the second vehicle based on a size of the bounding boxsurrounding the second vehicle in the video frame. The regression modelmay determine the distance to the second vehicle based on the equation:

Z=i+s*x ⁻¹,

where Z is the distance, x is one of a width or a height of the boundingbox. The parameter x may be the height of the bounding box when anaccuracy associated with determining the height of the bounding box isgreater than an accuracy associated with determining the width of thebounding box. The parameter x may be the width of the bounding box whenthe accuracy associated with determining the width of the bounding boxis greater than the accuracy associated with determining the height ofthe bounding box. The parameters i and s may be learned by theregression model by training the regression model. For example, theregression model may be trained to determine the distance of the secondvehicle in the cone of impact in a manner similar to that describedbelow with respect to FIG. 3.

Additionally, and/or alternatively, the vehicle proximity analysissystem 102 may determine the distance between the vehicle and the secondvehicle based on the telematic data. For example, the vehicle monitoringsystem 101 may include a radar, a LIDAR, and/or the like for obtainingobject distance data indicating a distance between the vehicle and anobject (e.g., the second vehicle) located within a particular distanceof the vehicle. The vehicle proximity analysis system 102 may determinethe distance based on the object distance data included in the telematicdata.

As shown by reference number 270, the vehicle proximity analysis system102 determines a headway score based on the distance to the secondvehicle and telematics data associated with the vehicle. The headwayscore may be representative of a severity associated with the vehiclebeing within a proximity threshold of the second vehicle during the timeperiod (e.g., a severity associated with the vehicle tailgating thesecond vehicle during the time period).

In some implementations, the headway score may represent an amount oftime required for the vehicle to reach a location of the second vehiclebased on the current speed of the vehicle. The vehicle proximityanalysis system 102 may determine a first headway score based on theamount of time required for the vehicle to reach the location of thesecond vehicle satisfying a first time threshold (e.g., 1.0 seconds, 2.0seconds, and/or the like) and/or a first distance threshold (e.g., 1.0meters, 2.0 meters, and/or the like). The vehicle proximity analysissystem 102 may determine a second headway score based on the amount oftime required for the vehicle to reach the location of the secondvehicle satisfying a second threshold (e.g., 7.0 seconds, 10.0 seconds,and/or the like) and/or a second distance threshold (e.g., 10.0 meters,11.0 meters, and/or the like). The first headway score may indicate agreater severity relative to the second headway score.

The vehicle proximity analysis system 102 may determine the headwayscore based on the distance to the vehicle and a speed of the vehicle.The vehicle proximity analysis system 102 may determine the speed of thevehicle based on the telematics data. For example, the telematics datamay include information indicating the speed of the vehicle andinformation indicating a time at which the vehicle was traveling at theindicated speed.

The vehicle proximity analysis system 102 may determine a timeassociated with the video frame. For example, the video data may includeinformation indicating a time at which the video frame was captured(e.g., a time stamp), a video frame rate associated with the video data,and/or the like. The vehicle proximity analysis system 102 may determinethe time associated with the video frame based on the informationincluded in the video data. The vehicle proximity analysis system 102may determine a speed of the vehicle associated with the video framebased on the information indicating the time at which the vehicle wastraveling at the indicated speed and the time associated with the videoframe.

The vehicle proximity analysis system 102 may determine a headway scoreassociated with the vehicle based on dividing the distance to the secondvehicle by the speed of the vehicle at the time associated with thevideo frame. In some implementations, the vehicle proximity analysissystem 102 determines a respective headway score for each video frame ofthe plurality of video frames.

In some implementations, the vehicle proximity analysis system 102determines a respective headway score for a set of video framesassociated with a period of time (e.g., five seconds, ten seconds,thirty seconds, one minute, and/or the like). In some implementations,the vehicle proximity analysis system 102 determines the duration of thetailgating event based on a set of video frames associated with a periodof time prior to the time associated with the video frame and/or a setof video frames associated with a period of time after the timeassociated with the video frame.

In some implementations, the vehicle proximity analysis system 102determines the period of time based on a time at which a harsh drivingevent occurred. For example, the vehicle proximity analysis system 102may determine the period of time based on a period of time prior to theoccurrence of the harsh driving event, a period of time after theoccurrence of a harsh driving event, and/or the like. In this way, thevehicle proximity analysis system 102 may determine whether the harshdriving event resulted from a tailgating event.

The vehicle proximity analysis system 102 may identify a video frame, ofthe plurality of video frames, associated with a tailgating event basedon the headway determined for the video frame satisfying a thresholdheadway. The vehicle proximity analysis system 102 may determine aseverity of the tailgating event based on a duration of the headwayevent. The vehicle proximity analysis system 102 may determine theduration of the tailgating event based on a series of video framespreceding the video frame associated with a headway that satisfies thethreshold headway and/or a series of video frames following the videoframe associated with a headway that satisfies the threshold headway.

For example, the vehicle proximity analysis system 102 may determinethat a headway for a first video frame immediately preceding the videoframe satisfies the threshold headway (e.g., 3.0 seconds, 5.0 seconds,2.0 meters, and/or the like), that a headway for a second video frameimmediately preceding the first video frame does not satisfy thethreshold headway, and that a headway for a third video frameimmediately following the video frame does not satisfy the thresholdheadway. The vehicle proximity analysis system 102 may determine theduration of the tailgating event based on a series of video frames thatincludes the first video frame and the video frame. For example, thevehicle proximity analysis system 102 may determine a first timeassociated with the first video frame and a second time associated withthe video frame. The vehicle proximity analysis system 102 may determinethe duration of the tailgating event based on the first time and thesecond time (e.g., subtracting the first time from the second time).

The vehicle proximity analysis system 102 may determine the headwayscore for the video frame based on the headway and the duration of thetailgating event. The vehicle proximity analysis system 102 maydetermine that the headway score comprises a first headway score (e.g.,a headway score indicating a severe tailgating event) based on theheadway satisfying a first headway severity threshold and/or theduration satisfying a first time threshold. The vehicle proximityanalysis system 102 may determine that the headway score comprises asecond headway score (e.g., a headway score indicating a mild or lesssevere tailgating event) based on the headway satisfying a secondheadway severity threshold and/or the duration satisfying a second timethreshold. In some implementations, the second time threshold may be thesame as the first time threshold. The vehicle proximity analysis system102 may determine that the headway score comprises a third headway score(e.g., a headway score indicating that a tailgating event did not occur)based on the headway failing to satisfying the first headway severitythreshold and the second headway severity threshold and/or the durationfailing to satisfy the first time threshold and the second timethreshold.

In some implementations, the vehicle proximity analysis system 102determines a respective headway score for each video frame, included inthe series of video frames and/or for each video frame of the pluralityof video frames, in a manner similar to that described above.

As shown in FIG. 2C, and by reference number 272, the vehicle proximityanalysis system 102 stores an entry in a data structure that identifiesthe headway score and the vehicle identifier associated with thevehicle. Based on determining the headway, the duration of thetailgating event, the headway score, and/or the like, the vehicleproximity analysis system 102 may associate the headway, the duration ofthe tailgating event, the headway score, and/or the like with thevehicle, an operator of the vehicle, a location of the vehicle, a timeat which the tailgating event occurred, and/or the like. The vehicleproximity analysis system 102 may store the entry in the data structurebased on associating the headway, the duration of the tailgating event,the headway score, and/or the like with the vehicle, the operator of thevehicle, the location of the vehicle, the time at which the tailgatingevent occurred, and/or the like. As shown in FIG. 2C, the entry includesthe vehicle identifier, an operator identifier associated with theoperator of the vehicle, a time and/or date at which the tailgatingevent occurred, and the headway score.

As shown by reference number 274, the vehicle proximity analysis system102 provides a notification associated with the entry being added to thedata structure and/or provides the headway score and the vehicleidentifier to the client device 204. The vehicle proximity analysissystem 102 may send the notification to the client device 204 to permitthe client device 204 to display information identifying the tailgatingevent, a portion of the video data associated with the tailgating event(e.g., the series of frames), the cone of impact, a portion of thetelematics data associated with the tailgating event, and/or the like atthe client device 204.

In some implementations, the vehicle proximity analysis system 102 mayprovide information to permit client device 204 to display, via a userinterface of the display, an icon on a map that indicates a tailgatingevent, the headway score determined for the tailgating event, and/or alocation of the vehicle associated with the tailgating event. In someimplementations, the user interface can display a menu that includesinformation regarding trips made by the vehicle. In someimplementations, a user of client device 204 can select a trip and theuser interface can display a map that shows the route associated withthe trip and one or more icons that indicate one or more tailgatingevents. In some implementations, for an icon of the one or more icons, acolor of the icon can indicate a severity of the tailgating event (e.g.,a red icon indicates a severe tailgating event, a yellow icon indicatesa mild tailgating event, and/or the like).

In some implementations, the vehicle proximity analysis system 102 mayprovide a notification of the tailgating event to a client device 204used by a fleet manager. In some implementations, the notification mayinclude an automatically generated video clip of the tailgating event.For example, vehicle proximity analysis system 102 may select frames ofvideo data relating to the tailgating event that precede the drivingevent (e.g., a harsh driving event), and may generate a video file ofthe selected frames. In some implementations, vehicle proximity analysissystem 102 may generate an overlay of contextual data for the videofile. For example, the vehicle proximity analysis system 102 may overlaytelematics data, location data, and/or the like in the video file forreview by the fleet manager. In some implementations, vehicle proximityanalysis system 102 may generate a virtual reality file for display. Forexample, the vehicle proximity analysis system 102 may combine videodata from a plurality of sources (e.g., a dashboard camera as well asother on-vehicle cameras (a backup camera, a mirror camera, etc.),publicly available video sources within a threshold proximity of thetailgating event, etc.) to generate a virtual reality file. In thiscase, the vehicle proximity analysis system 102 may push the virtualreality file to a virtual reality display type of client device 204 forreview.

In this way, the vehicle proximity analysis system 102 enables auditingof results of classifying the driving event as a tailgating event. Forexample, the fleet manager may confirm that the vehicle proximityanalysis system 102 is correct in classifying the driving event as atailgating event (e.g., after viewing the video file) and may provideconfirmation via client device 204.

As shown by reference number 276, the vehicle proximity analysis system102 receives authentication of the headway score and the tailgateseverity and trains the tailgate detection model. Based on receiving theauthentication of the headway score, the vehicle proximity analysissystem 102 may update the tailgate detection model based at least inpart on the fleet manager confirming the classification of the drivingevent as a tailgating event. In this way, the vehicle proximity analysissystem 102 enables supervised machine learning.

By utilizing the authentication to update the tailgate detection model,the vehicle proximity analysis system 102 may increase an amount oftraining data available to train the tailgate detection model.Increasing the amount of training data used to train the tailgatedetection model may improve an accuracy of the tailgate detection modelassociated with detecting tailgating events based on headway scores.Further, by improving the accuracy of the tailgate detection model, thevehicle proximity analysis system 102 may conserve computing resourcesassociated with inaccurately detecting tailgating events, performing anaction associated with the tailgating event being inaccuratelydetermined, and/or the like.

As indicated above, FIGS. 2A-2C are provided as an example. Otherexamples may differ from what is described with regard to FIGS. 2A-2C.The number and arrangement of devices shown in FIGS. 2A-2C are providedas an example. In practice, there may be additional devices, fewerdevices, different devices, or differently arranged devices than thoseshown in FIGS. 2A-2C. Furthermore, two or more devices shown in FIGS.2A-2C may be implemented within a single device, or a single deviceshown in FIGS. 2A-2C may be implemented as multiple, distributeddevices. Additionally, or alternatively, a set of devices (e.g., one ormore devices) shown in FIGS. 2A-2C may perform one or more functionsdescribed as being performed by another set of devices shown in FIGS.2A-2C.

FIG. 3 is a diagram illustrating an example 300 of training and using amachine learning model in connection with detecting tailgating by avehicle. The machine learning model training and usage described hereinmay be performed using a machine learning system. The machine learningsystem may include or may be included in a computing device, a server, acloud computing environment, and/or the like, such as the vehicleproximity analysis system 102 described in more detail elsewhere herein.

As shown by reference number 305, a machine learning model may betrained using a set of observations. The set of observations may beobtained from historical data, such as data gathered during one or moreprocesses described herein. In some implementations, the machinelearning system may receive the set of observations (e.g., as input)from vehicle proximity analysis system 102, as described elsewhereherein.

As shown by reference number 310, the set of observations includes afeature set. The feature set may include a set of variables, and avariable may be referred to as a feature. A specific observation mayinclude a set of variable values (or feature values) corresponding tothe set of variables. In some implementations, the machine learningsystem may determine variables for a set of observations and/or variablevalues for a specific observation based on input received from thevehicle proximity analysis system 102 and/or the vehicle monitoringsystem 101. For example, the machine learning system may identify afeature set (e.g., one or more features and/or feature values) byextracting the feature set from structured data, by performing naturallanguage processing to extract the feature set from unstructured data,by receiving input from an operator, and/or the like.

As an example, a feature set for a set of observations may include afirst feature of distance, a second feature of speed, a third feature ofduration, and so on. As shown, for a first observation, the firstfeature may have a value of two meters, the second feature may have avalue of sixty kilometers per hour, the third feature may have a valueof sixty seconds, and so on. These features and feature values areprovided as examples, and may differ in other examples.

As shown by reference number 315, the set of observations may beassociated with a target variable. The target variable may represent avariable having a numeric value, may represent a variable having anumeric value that falls within a range of values or has some discretepossible values, may represent a variable that is selectable from one ofmultiple options (e.g., one of multiples classes, classifications,labels, and/or the like), may represent a variable having a Booleanvalue, and/or the like. A target variable may be associated with atarget variable value, and a target variable value may be specific to anobservation. In example 300, the target variable is tailgate severity,which has a value of 9.5 for the first observation.

The target variable may represent a value that a machine learning modelis being trained to predict, and the feature set may represent thevariables that are input to a trained machine learning model to predicta value for the target variable. The set of observations may includetarget variable values so that the machine learning model can be trainedto recognize patterns in the feature set that lead to a target variablevalue. A machine learning model that is trained to predict a targetvariable value may be referred to as a supervised learning model.

In some implementations, the machine learning model may be trained on aset of observations that do not include a target variable. This may bereferred to as an unsupervised learning model. In this case, the machinelearning model may learn patterns from the set of observations withoutlabeling or supervision, and may provide output that indicates suchpatterns, such as by using clustering and/or association to identifyrelated groups of items within the set of observations.

As shown by reference number 320, the machine learning system may traina machine learning model using the set of observations and using one ormore machine learning algorithms, such as a regression algorithm, adecision tree algorithm, a neural network algorithm, a k-nearestneighbor algorithm, a support vector machine algorithm, and/or the like.After training, the machine learning system may store the machinelearning model as a trained machine learning model 325 to be used toanalyze new observations.

As shown by reference number 330, the machine learning system may applythe trained machine learning model 325 to a new observation, such as byreceiving a new observation and inputting the new observation to thetrained machine learning model 325. As shown, the new observation mayinclude a first feature of distance, a second feature of speed, a thirdfeature of duration, and so on, as an example. The machine learningsystem may apply the trained machine learning model 325 to the newobservation to generate an output (e.g., a result). The type of outputmay depend on the type of machine learning model and/or the type ofmachine learning task being performed. For example, the output mayinclude a predicted value of a target variable, such as when supervisedlearning is employed. Additionally, or alternatively, the output mayinclude information that identifies a cluster to which the newobservation belongs, information that indicates a degree of similaritybetween the new observation and one or more other observations, and/orthe like, such as when unsupervised learning is employed.

As an example, the trained machine learning model 325 may predict avalue of 7.4 for the target variable of tailgate severity for the newobservation, as shown by reference number 335. Based on this prediction,the machine learning system may provide a first recommendation, mayprovide output for determination of a first recommendation, may performa first automated action, may cause a first automated action to beperformed (e.g., by instructing another device to perform the automatedaction), and/or the like.

In some implementations, the trained machine learning model 325 mayclassify (e.g., cluster) the new observation in a cluster, as shown byreference number 340. The observations within a cluster may have athreshold degree of similarity. As an example, if the machine learningsystem classifies the new observation in a first cluster (e.g., a severetailgating event cluster), then the machine learning system may providea first recommendation, such as the first recommendation describedabove. Additionally, or alternatively, the machine learning system mayperform a first automated action and/or may cause a first automatedaction to be performed (e.g., by instructing another device to performthe automated action) based on classifying the new observation in thefirst cluster, such as the first automated action described above.

As another example, if the machine learning system were to classify thenew observation in a second cluster (e.g., a no tailgating eventcluster), then the machine learning system may provide a second (e.g.,different) recommendation and/or may perform or cause performance of asecond (e.g., different) automated action.

In some implementations, the recommendation and/or the automated actionassociated with the new observation may be based on a target variablevalue having a particular label (e.g., classification, categorization,and/or the like), may be based on whether a target variable valuesatisfies one or more threshold (e.g., whether the target variable valueis greater than a threshold, is less than a threshold, is equal to athreshold, falls within a range of threshold values, and/or the like),may be based on a cluster in which the new observation is classified,and/or the like.

In this way, the machine learning system may apply a rigorous andautomated process to detect tailgating by a vehicle. The machinelearning system enables recognition and/or identification of tens,hundreds, thousands, or millions of features and/or feature values fortens, hundreds, thousands, or millions of observations, therebyincreasing accuracy and consistency and reducing delay associated withdetecting tailgating relative to requiring computing resources to beallocated for tens, hundreds, or thousands of operators to manuallydetect tailgating by a vehicle using the features or feature values.

As indicated above, FIG. 3 is provided as an example. Other examples maydiffer from what is described in connection with FIG. 3.

FIG. 4 is a diagram of an example environment 400 in which systemsand/or methods described herein may be implemented. As shown in FIG. 4,environment 400 may include a vehicle proximity analysis system 102. Insome implementations, the vehicle proximity analysis system 102 may belocated within a vehicle. In some implementations, the vehicle proximityanalysis system 102 may be located within a device (e.g., vehiclemonitoring system 101, client device 204, and/or the like). In someimplementations, the vehicle proximity analysis system 102 may includeone or more elements of and/or may execute within a cloud computingsystem 402. The cloud computing system 402 may include one or moreelements 403-413, as described in more detail below. As further shown inFIG. 4, environment 400 may include a network 420, vehicle monitoringsystem 101, video storage device 202, and/or client device 204. Devicesand/or elements of environment 400 may interconnect via wiredconnections and/or wireless connections.

The cloud computing system 402 includes computing hardware 403, aresource management component 404, a host operating system (OS) 405,and/or one or more virtual computing systems 406. The resourcemanagement component 404 may perform virtualization (e.g., abstraction)of computing hardware 403 to create the one or more virtual computingsystems 406. Using virtualization, the resource management component 404enables a single computing device (e.g., a computer, a server, and/orthe like) to operate like multiple computing devices, such as bycreating multiple isolated virtual computing systems 406 from computinghardware 403 of the single computing device. In this way, computinghardware 403 can operate more efficiently, with lower power consumption,higher reliability, higher availability, higher utilization, greaterflexibility, and lower cost than using separate computing devices.

Computing hardware 403 includes hardware and corresponding resourcesfrom one or more computing devices. For example, computing hardware 403may include hardware from a single computing device (e.g., a singleserver) or from multiple computing devices (e.g., multiple servers),such as multiple computing devices in one or more data centers. Asshown, computing hardware 403 may include one or more processors 407,one or more memories 408, one or more storage components 409, and/or oneor more networking components 410. Examples of a processor, a memory, astorage component, and a networking component (e.g., a communicationcomponent) are described elsewhere herein.

The resource management component 404 includes a virtualizationapplication (e.g., executing on hardware, such as computing hardware403) capable of virtualizing computing hardware 403 to start, stop,and/or manage one or more virtual computing systems 406. For example,the resource management component 404 may include a hypervisor (e.g., abare-metal or Type 1 hypervisor, a hosted or Type 2 hypervisor, and/orthe like) or a virtual machine monitor, such as when the virtualcomputing systems 406 are virtual machines 411. Additionally, oralternatively, the resource management component 404 may include acontainer manager, such as when the virtual computing systems 406 arecontainers 412. In some implementations, the resource managementcomponent 404 executes within and/or in coordination with a hostoperating system 405.

A virtual computing system 406 includes a virtual environment thatenables cloud-based execution of operations and/or processes describedherein using computing hardware 403. As shown, a virtual computingsystem 406 may include a virtual machine 411, a container 412, a hybridenvironment 413 that includes a virtual machine and a container, and/orthe like. A virtual computing system 406 may execute one or moreapplications using a file system that includes binary files, softwarelibraries, and/or other resources required to execute applications on aguest operating system (e.g., within the virtual computing system 406)or the host operating system 405.

Although the vehicle proximity analysis system 102 may include one ormore elements 403-413 of the cloud computing system 402, may executewithin the cloud computing system 402, and/or may be hosted within thecloud computing system 402, in some implementations, the vehicleproximity analysis system 102 may not be cloud-based (e.g., may beimplemented outside of a cloud computing system) or may be partiallycloud-based. For example, the vehicle proximity analysis system 102 mayinclude one or more devices that are not part of the cloud computingsystem 402, such as device 500 of FIG. 5, which may include a standaloneserver or another type of computing device. The vehicle proximityanalysis system 102 may perform one or more operations and/or processesdescribed in more detail elsewhere herein.

Network 420 includes one or more wired and/or wireless networks. Forexample, network 420 may include a cellular network, a public landmobile network (PLMN), a local area network (LAN), a wide area network(WAN), a private network, the Internet, and/or the like, and/or acombination of these or other types of networks. The network 420 enablescommunication among the devices of environment 400.

Vehicle monitoring system 101 includes one or more devices capable ofreceiving, generating, storing, processing, and/or providing informationassociated with detecting tailgating events. For example, vehiclemonitoring system 101 may include a camera, a telemetry device such as atelematics sensor, and/or a communication component (e.g., a mobilephone device, a wireless communication device, and/or the like). In someimplementations, the camera may include a dashboard camera, a videocamera, and/or the like, and may capture and collect video dataconcerning the vehicle, the trajectory of the vehicle, a road that thevehicle is traveling on, one or more objects on and/or near the road,and/or the like. In some implementations, the telematics sensor mayinclude an accelerometer that collects data concerningacceleration/deceleration of the vehicle, and/or can include a globalpositioning system (GPS) sensor that collects data concerning a positionof the vehicle. In some implementations, the communication component mayfacilitate communication between vehicle monitoring system 101 and theone or more other devices, such as video storage device 202, clientdevice 204, and/or vehicle proximity analysis system 102, via network420.

Video storage device 202 includes one or more devices capable ofreceiving, generating, storing, processing, and/or providing video dataassociated with detecting tailgating events. For example, video storagedevice 202 may include a computing device, a server device, a datacenter device, or other device capable of receiving video data fromvehicle monitoring system 101, storing the video data, and/or hostingthe video data for download by vehicle proximity analysis system 102and/or client device 204.

Client device 204 includes one or more devices capable of receiving,generating, storing, processing, and/or providing information associatedwith detecting tailgating events. For example, client device 204 mayinclude a communication and/or computing device, such as a mobile phone(e.g., a smart phone, a radiotelephone, and/or the like), a laptopcomputer, a tablet computer, a handheld computer, a gaming device, awearable communication device (e.g., a smart wristwatch, a pair of smarteyeglasses, and/or the like), or a similar type of device. In someimplementations, client device 204 may display information concerning atailgating event, a headway score associated with the tailgating event,video data concerning the tailgating event, data concerningacceleration/deceleration of a vehicle, and/or data concerning aposition of the vehicle.

The number and arrangement of devices and networks shown in FIG. 4 areprovided as an example. In practice, there may be additional devicesand/or networks, fewer devices and/or networks, different devices and/ornetworks, or differently arranged devices and/or networks than thoseshown in FIG. 4. Furthermore, two or more devices shown in FIG. 4 may beimplemented within a single device, or a single device shown in FIG. 4may be implemented as multiple, distributed devices. Additionally, oralternatively, a set of devices (e.g., one or more devices) ofenvironment 400 may perform one or more functions described as beingperformed by another set of devices of environment 400.

FIG. 5 is a diagram of example components of a device 500, which maycorrespond to vehicle proximity analysis system 102, vehicle monitoringsystem 101, video storage device 202, and/or client device 204. In someimplementations, vehicle proximity analysis system 102, vehiclemonitoring system 101, video storage device 202, and/or client device204 may include one or more devices 500 and/or one or more components ofdevice 500. As shown in FIG. 5, device 500 may include a bus 510, aprocessor 520, a memory 530, a storage component 540, an input component550, an output component 560, and a communication component 570.

Bus 510 includes a component that enables wired and/or wirelesscommunication among the components of device 500. Processor 520 includesa central processing unit, a graphics processing unit, a microprocessor,a controller, a microcontroller, a digital signal processor, afield-programmable gate array, an application-specific integratedcircuit, and/or another type of processing component. Processor 520 isimplemented in hardware, firmware, or a combination of hardware andsoftware. In some implementations, processor 520 includes one or moreprocessors capable of being programmed to perform a function. Memory 530includes a random access memory, a read only memory, and/or another typeof memory (e.g., a flash memory, a magnetic memory, and/or an opticalmemory).

Storage component 540 stores information and/or software related to theoperation of device 500. For example, storage component 540 may includea hard disk drive, a magnetic disk drive, an optical disk drive, a solidstate disk drive, a compact disc, a digital versatile disc, and/oranother type of non-transitory computer-readable medium. Input component550 enables device 500 to receive input, such as user input and/orsensed inputs. For example, input component 550 may include a touchscreen, a keyboard, a keypad, a mouse, a button, a microphone, a switch,a sensor, a global positioning system component, an accelerometer, agyroscope, an actuator, and/or the like. Output component 560 enablesdevice 500 to provide output, such as via a display, a speaker, and/orone or more light-emitting diodes. Communication component 570 enablesdevice 500 to communicate with other devices, such as via a wiredconnection and/or a wireless connection. For example, communicationcomponent 570 may include a receiver, a transmitter, a transceiver, amodem, a network interface card, an antenna, and/or the like.

Device 500 may perform one or more processes described herein. Forexample, a non-transitory computer-readable medium (e.g., memory 530and/or storage component 540) may store a set of instructions (e.g., oneor more instructions, code, software code, program code, and/or thelike) for execution by processor 520. Processor 520 may execute the setof instructions to perform one or more processes described herein. Insome implementations, execution of the set of instructions, by one ormore processors 520, causes the one or more processors 520 and/or thedevice 500 to perform one or more processes described herein. In someimplementations, hardwired circuitry may be used instead of or incombination with the instructions to perform one or more processesdescribed herein. Thus, implementations described herein are not limitedto any specific combination of hardware circuitry and software.

The number and arrangement of components shown in FIG. 5 are provided asan example. Device 500 may include additional components, fewercomponents, different components, or differently arranged componentsthan those shown in FIG. 5. Additionally, or alternatively, a set ofcomponents (e.g., one or more components) of device 500 may perform oneor more functions described as being performed by another set ofcomponents of device 500.

FIG. 6 is a flowchart of an example process 600 associated withdetecting tailgating by a vehicle. In some implementations, one or moreprocess blocks of FIG. 6 may be performed by a device (e.g., vehicleproximity analysis system 102). In some implementations, one or moreprocess blocks of FIG. 6 may be performed by another device or a groupof devices separate from or including the device, such as a vehiclemonitoring system (e.g., vehicle monitoring system 101), a video storagedevice (e.g., video storage device 202), and/or a client device (e.g.,client device 204). Additionally, or alternatively, one or more processblocks of FIG. 6 may be performed by one or more components of device500, such as processor 520, memory 530, storage component 540, inputcomponent 550, output component 560, and/or communication component 570.

As shown in FIG. 6, process 600 may include obtaining video data andtelematics data that are associated with a driving event involving afirst vehicle (block 605). For example, the device may obtain video dataand telematics data that are associated with a driving event involving afirst vehicle, as described above. In some implementations, the videodata includes a plurality of video frames captured by a cameraassociated with the first vehicle. In some implementations, the camerais mounted to the first vehicle and configured to have a field of viewthat corresponds to a direction of travel of the first vehicle.

In some implementations, at least one of the telematics data, the videodata, a user input to a user interface associated with the device, orsensor data from another device indicates a harsh driving event thattriggers acquisition of the video data and the telematics data, andwherein the driving event is associated with the harsh driving event.

As further shown in FIG. 6, process 600 may include detecting a secondvehicle depicted in a video frame (block 610). For example, the devicemay detect a second vehicle depicted in a video frame of the pluralityof video frames, as described above.

As further shown in FIG. 6, process 600 may include determining avanishing point associated with the video data based on a location ofthe second vehicle within the video frame (block 615). For example, thedevice may determine a vanishing point associated with the video databased on a location of the second vehicle within the video frame, asdescribed above.

In some implementations, determining the vanishing point comprisesdetermining a bounding box within the video frame that includes thesecond vehicle; determining a trajectory of the second vehicle based onthe bounding box; and determining the vanishing point based on thetrajectory of the second vehicle. The trajectory of the second vehiclemay be determined by determining a plurality of corners of the boundingbox; determining a plurality of trajectories based on the plurality ofcorners of the bounding box; determining an intersection pointassociated with the plurality of trajectories; and determining thevanishing point based on the intersection point.

Alternatively, and/or additionally, determining the vanishing point maycomprise detecting a plurality of vehicles depicted in the subset ofvideo frames; determining a first bounding box that includes the secondvehicle and a second bounding box that includes a third vehicle, of theplurality of vehicles; determining a first candidate vanishing pointbased on the first bounding box; determining a second candidatevanishing point based on the second bounding box; and determining thevanishing point based on the first candidate vanishing point and thesecond candidate vanishing point.

In some implementations, the device determines the first candidatevanishing point and a first confidence score based on the trajectory ofthe second vehicle. The device may determine a trajectory of the thirdvehicle based on the second bounding box. The device may determine thesecond candidate vanishing point and a second confidence score based onthe trajectory of the third vehicle. The device may determine a firstweighted vanishing point based on the first candidate vanishing pointand the first confidence score. The device may determine a secondweighted vanishing point based on the second candidate vanishing pointand the second confidence score. The device may determine the vanishingpoint based on the first weighted vanishing point and the secondweighted vanishing point.

As further shown in FIG. 6, process 600 may include constructing a coneof impact of the first vehicle for a subset of video frames, of theplurality of video frames, based on the vanishing point (block 620). Forexample, the device may construct a cone of impact of the first vehiclefor a subset of video frames, of the plurality of video frames, based onthe vanishing point, as described above.

In some implementations, constructing the cone of impact of the firstvehicle for the subset of video frames comprises computing an opticalflow of the subset of video frames, determining vanishing points of thesubset of video frames, and constructing the cone of impact of the firstvehicle for the subset of video frames based on the optical flow and thevanishing points.

As further shown in FIG. 6, process 600 may include determining that thesecond vehicle is within the cone of impact in the subset of videoframes (block 625). For example, the device may determine that thesecond vehicle is within the cone of impact in the subset of videoframes, as described above. In some implementations, the device mayutilize a vehicle detection model to detect the second vehicle. Thevehicle detection model may be configured to detect the second vehiclebased on a vehicle type of the second vehicle.

In some implementations, determining that the second vehicle is withinthe cone of impact comprises determining a bounding box, that includesthe second vehicle, within the video frame; identifying a lowest edge ofthe bounding box relative to other edges of the bounding box;determining a center point of the lowest edge of the bounding box;determining that the center point is within the cone of impact; anddetermining that the second vehicle is within the cone of impact basedon the center point being within the cone of impact.

As further shown in FIG. 6, process 600 may include analyzing the subsetof video frames to determine a distance between the first vehicle andthe second vehicle in the subset of video frames (block 630). Forexample, the device may analyze the subset of video frames to determinea distance between the first vehicle and the second vehicle in thesubset of video frames, as described above.

In some implementations, analyzing the subset of video frames todetermine the distance comprises determining, based on a shape of thesecond vehicle as depicted in the subset of video frames, a type of thesecond vehicle, determining a size of the second vehicle as depicted inthe subset of video frames, and determining the distance based on thetype of the second vehicle and the size of the second vehicle.

In some implementations, the device uses a depth analysis model todetermine the distance between the first vehicle and the second vehiclebased on the subset of video frames. The depth analysis model may betrained based on historical video data that depicts other vehicles andcorresponding distance information associated with the other vehicles.The other vehicles may be a same vehicle type as a vehicle type of thesecond vehicle.

As further shown in FIG. 6, process 600 may include determining, basedon the telematics data, a speed of the first vehicle during a timeperiod associated with the subset of video frames (block 635). Forexample, the device may determine, based on the telematics data, a speedof the first vehicle during a time period associated with the subset ofvideo frames, as described above.

As further shown in FIG. 6, process 600 may include determining aheadway score based on the distance and the speed (block 640). Forexample, the device may determine a headway score based on the distanceand the speed, as described above. In some implementations, the headwayscore is representative of a severity associated with the first vehiclebeing within a proximity threshold of the second vehicle during the timeperiod.

As further shown in FIG. 6, process 600 may include determining that theheadway score satisfies a threshold headway score (block 645). Forexample, the device may determine that the headway score satisfies athreshold headway score, as described above.

As further shown in FIG. 6, process 600 may include determining anoccurrence of a tailgating event based on the headway score satisfyingthe threshold headway score (block 650). For example, the device maydetermine an occurrence of a tailgating event based on the headway scoresatisfying the threshold headway score, as described above.

The device may classify, based on the headway score satisfying thethreshold headway score, the driving event as including a tailgatingevent, wherein a message sent to a client device indicates that thedriving event includes the tailgating event. Alternatively, and/oradditionally, the device may store the headway score based ondetermining that the headway score satisfies the threshold headwayscore. The device may store the headway score in a data structure inassociation with the video data based on the headway score satisfyingthe threshold headway score. The data structure may include a pluralityof headway scores that are associated with a plurality of vehicles of afleet.

As further shown in FIG. 6, process 600 may include sending, to a clientdevice, a message associated with the tailgating event (block 655). Forexample, the device may send, to a client device, a message associatedwith the tailgating event, as described above. In some implementations,the client device is one of a plurality of client devices, the methodfurther comprising prior to sending the message, identifying, based onan identifier associated with the video data or the telematics data, avehicle identifier of the first vehicle, and selecting, based on thevehicle identifier being mapped to the client device, the client devicefrom the plurality of client devices, wherein the message is sent to theclient device based on selecting the client device. In someimplementations, the vehicle is one of a plurality of vehicles of afleet and the client device is associated with managing the fleet.

In some implementations, the device may send, to the client device, arequest for an authentication of the headway score indicating that thetailgating event. The device may receive, from the client device, aresponse associated with the authentication.

Although FIG. 6 shows example blocks of process 600, in someimplementations, process 600 may include additional blocks, fewerblocks, different blocks, or differently arranged blocks than thosedepicted in FIG. 6. Additionally, or alternatively, two or more of theblocks of process 600 may be performed in parallel.

The foregoing disclosure provides illustration and description, but isnot intended to be exhaustive or to limit the implementations to theprecise form disclosed. Modifications and variations may be made inlight of the above disclosure or may be acquired from practice of theimplementations.

As used herein, the term “component” is intended to be broadly construedas hardware, firmware, or a combination of hardware and software.

Some implementations are described herein in connection with thresholds.As used herein, satisfying a threshold may, depending on the context,refer to a value being greater than the threshold, more than thethreshold, higher than the threshold, greater than or equal to thethreshold, less than the threshold, fewer than the threshold, lower thanthe threshold, less than or equal to the threshold, equal to thethreshold, etc., depending on the context.

Certain user interfaces have been described herein and/or shown in thefigures. A user interface may include a graphical user interface, anon-graphical user interface, a text-based user interface, and/or thelike. A user interface may provide information for display. In someimplementations, a user may interact with the information, such as byproviding input via an input component of a device that provides theuser interface for display. In some implementations, a user interfacemay be configurable by a device and/or a user (e.g., a user may changethe size of the user interface, information provided via the userinterface, a position of information provided via the user interface,etc.). Additionally, or alternatively, a user interface may bepre-configured to a standard configuration, a specific configurationbased on a type of device on which the user interface is displayed,and/or a set of configurations based on capabilities and/orspecifications associated with a device on which the user interface isdisplayed.

To the extent the aforementioned implementations collect, store, oremploy personal information of individuals, it should be understood thatsuch information shall be used in accordance with all applicable lawsconcerning protection of personal information. Additionally, thecollection, storage, and use of such information can be subject toconsent of the individual to such activity, for example, through wellknown “opt-in” or “opt-out” processes as can be appropriate for thesituation and type of information. Storage and use of personalinformation can be in an appropriately secure manner reflective of thetype of information, for example, through various encryption andanonymization techniques for particularly sensitive information.

It will be apparent that systems and/or methods described herein may beimplemented in different forms of hardware, firmware, and/or acombination of hardware and software. The actual specialized controlhardware or software code used to implement these systems and/or methodsis not limiting of the implementations. Thus, the operation and behaviorof the systems and/or methods are described herein without reference tospecific software code—it being understood that software and hardwarecan be used to implement the systems and/or methods based on thedescription herein.

Even though particular combinations of features are recited in theclaims and/or disclosed in the specification, these combinations are notintended to limit the disclosure of various implementations. In fact,many of these features may be combined in ways not specifically recitedin the claims and/or disclosed in the specification. Although eachdependent claim listed below may directly depend on only one claim, thedisclosure of various implementations includes each dependent claim incombination with every other claim in the claim set.

No element, act, or instruction used herein should be construed ascritical or essential unless explicitly described as such. Also, as usedherein, the articles “a” and “an” are intended to include one or moreitems, and may be used interchangeably with “one or more.” Further, asused herein, the article “the” is intended to include one or more itemsreferenced in connection with the article “the” and may be usedinterchangeably with “the one or more.” Furthermore, as used herein, theterm “set” is intended to include one or more items (e.g., relateditems, unrelated items, a combination of related and unrelated items,etc.), and may be used interchangeably with “one or more.” Where onlyone item is intended, the phrase “only one” or similar language is used.Also, as used herein, the terms “has,” “have,” “having,” or the like areintended to be open-ended terms. Further, the phrase “based on” isintended to mean “based, at least in part, on” unless explicitly statedotherwise. Also, as used herein, the term “or” is intended to beinclusive when used in a series and may be used interchangeably with“and/or,” unless explicitly stated otherwise (e.g., if used incombination with “either” or “only one of”).

What is claimed is:
 1. A method, comprising: obtaining, by a device,video data comprising a plurality of video frames, and telematics datathat are associated with a driving event involving a first vehicle;detecting, by the device, a second vehicle depicted in a video frame, ofthe plurality of video frames; determining, by the device, a vanishingpoint associated with the video data based on a location of the secondvehicle within the video frame; constructing, by the device, a cone ofimpact of the first vehicle for a subset of video frames containing thevideo frame, of the plurality of video frames, based on the vanishingpoint; determining, by the device, that the second vehicle is within thecone of impact in the subset of video frames; determining, by thedevice, a headway score based on a distance between the first vehicleand the second vehicle and a speed of the first vehicle, based on thesubset of video frames; determining, by the device, an occurrence of atailgating event based on the headway score satisfying a thresholdheadway score; and sending, by the device and to a client device, amessage associated with the tailgating event.
 2. The method of claim 1,wherein determining the vanishing point comprises: determining abounding box within the video frame that includes the second vehicle;determining a trajectory of the second vehicle based on the boundingbox; and determining the vanishing point based on the trajectory of thesecond vehicle.
 3. The method of claim 2, wherein determining thetrajectory of the second vehicle comprises: determining a plurality ofcorners of the bounding box; determining a plurality of trajectoriesbased on the plurality of corners of the bounding box; determining anintersection point associated with the plurality of trajectories; anddetermining the vanishing point based on the intersection point.
 4. Themethod of claim 1, wherein determining the vanishing point comprises:computing an optical flow of the subset of video frames; and determiningvanishing points of the subset of video frames, wherein the cone ofimpact of the first vehicle for the subset of video frames isconstructed based on the optical flow and the vanishing points.
 5. Themethod of claim 1, wherein determining the distance between the firstand second vehicle comprises: determining, based on a shape of thesecond vehicle as depicted in the subset of video frames, a type of thesecond vehicle; determining a size of the second vehicle as depicted inthe subset of video frames; and determining the distance based on thetype of the second vehicle and the size of the second vehicle.
 6. Themethod of claim 1, wherein determining that the second vehicle is withinthe cone of impact comprises: determining a bounding box, that includesthe second vehicle, within the video frame; identifying a lowest edge ofthe bounding box relative to other edges of the bounding box;determining a center point of the lowest edge of the bounding box;determining that the center point is within the cone of impact; anddetermining that the second vehicle is within the cone of impact basedon the center point being within the cone of impact.
 7. The method ofclaim 1, wherein determining the vanishing point comprises: detecting aplurality of vehicles depicted in the subset of video frames, whereinthe plurality of vehicles includes the second vehicle and a thirdvehicle; determining a first bounding box that includes the secondvehicle and a second bounding box that includes the third vehicle;determining a first candidate vanishing point based on the firstbounding box; determining a second candidate vanishing point based onthe second bounding box; and determining the vanishing point based onthe first candidate vanishing point and the second candidate vanishingpoint.
 8. A device, comprising: one or more memories; and one or moreprocessors configured to: receive information associated with a drivingevent involving a first vehicle, wherein the information includes avehicle identifier of the first vehicle; obtain, based on theinformation, video data and telematics data that are associated with thedriving event, wherein the video data includes a plurality of videoframes that depict the driving event; process, using a vehicle detectionmodel, a subset of video frames, of the plurality of video frames, togenerate an output, wherein the output includes information identifyinga bounding box within the subset of video frames, and wherein thebounding box includes a second vehicle depicted in the subset of videoframes; determine a trajectory of the second vehicle based on thebounding box; determine a vanishing point associated with the subset ofvideo frames based on the trajectory of the second vehicle; construct acone of impact of the first vehicle for the subset of video frames basedon the vanishing point; determine that the second vehicle is within thecone of impact in the subset of video frames based on the bounding box;determine a headway score based on a distance between the first vehicleand the second vehicle in the subset of video frames and a speed of thefirst vehicle during a time period associated with the subset of videoframes; determine an occurrence of a tailgating event based on theheadway score; store, in a data structure, the headway score inassociation with the vehicle identifier based on the occurrence of thetailgating event; and provide, to a client device, an indication thatthe headway score is stored in the data structure in association withthe vehicle identifier.
 9. The device of claim 8, wherein the boundingbox comprises a first bounding box and the output includes informationidentifying a second bounding box that includes a third vehicle, whereinthe one or more processors are further configured to: determine atrajectory of the third vehicle based on the second bounding box; andwherein the one or more processors, when determining the vanishingpoint, are configured to: determine a trajectory of the third vehiclebased on the second bounding box; determine a first candidate vanishingpoint and a first confidence score based on the trajectory of the secondvehicle; determine a second candidate vanishing point and a secondconfidence score based on the trajectory of the third vehicle; determinea first weighted vanishing point based on the first candidate vanishingpoint and the first confidence score; determine a second weightedvanishing point based on the second candidate vanishing point and thesecond confidence score; and determine the vanishing point based on thefirst weighted vanishing point and the second weighted vanishing point.10. The device of claim 8, wherein the vehicle detection model isconfigured to detect the second vehicle based on a vehicle type of thesecond vehicle.
 11. The device of claim 8, wherein the one or moreprocessors are further configured to: determine, using a depth analysismodel, the distance between the first vehicle and the second vehiclebased on the subset of video frames, wherein the depth analysis modelhas been trained based on historical video data that depicts othervehicles and corresponding distance information associated with theother vehicles, wherein the other vehicles are a same vehicle type as avehicle type of the second vehicle.
 12. The device of claim 8, whereinthe one or more processors, when determining the occurrence of thetailgating event, are configured to: determine that the headway scoresatisfies a tailgating threshold; and determine occurrence of thetailgating event based on the headway score satisfying the tailgatingthreshold.
 13. The device of claim 8, wherein the first vehicle is oneof a plurality of vehicles of a fleet and the client device isassociated with managing the fleet, and wherein the data structureincludes a plurality of headway scores that are associated with theplurality of vehicles.
 14. The device of claim 8, wherein the one ormore processors are further configured to: send, to the client device, arequest for an authentication of the headway score indicating theoccurrence of the tailgating event; receive, from the client device, aresponse associated with the authentication; and retrain, based on theresponse, a tailgating detection model associated with detectingtailgating events based on headway scores.
 15. A non-transitorycomputer-readable medium storing a set of instructions, the set ofinstructions comprising: one or more instructions that, when executed byone or more processors of a device, cause the device to: obtain videodata and telematics data that are associated with a driving eventinvolving a first vehicle, wherein the telematics data indicates thatthe driving event included a harsh driving event; detect a secondvehicle depicted in a video frame included in the video data; determinea vanishing point associated with the video data based on a location ofthe second video within the video frame; construct a cone of impactassociated with the first vehicle for a subset of video framescontaining the video frame included in the video data based on thevanishing point; determine that the second vehicle is within the cone ofimpact in the subset of video frames; determine a headway score based ona distance between the first vehicle and the second vehicle in thesubset of video frames and based on a speed of the first vehicle duringa time period associated with the subset of video frames; determine,based on the headway score satisfying a threshold headway score, anoccurrence of a tailgating event; and perform an action associated withthe headway score and a vehicle identifier of the first vehicle based ondetermining the occurrence of the tailgating event.
 16. Thenon-transitory computer-readable medium of claim 15, wherein the one ormore instructions, that cause the device to determine the headway score,cause the device to: identify the subset of video frames based on thesecond vehicle being within the cone of impact in the subset of videoframes; and determine the distance based on a shape of the secondvehicle and size of the second vehicle in the subset of video frames.17. The non-transitory computer-readable medium of claim 15, wherein theone or more instructions, that cause the device to determine thevanishing point, cause the device to: compute an optical flow of thesubset of video frames; determine vanishing points of the subset ofvideo frames; and construct the cone of impact of the first vehicle forthe subset of video frames based on the optical flow and the vanishingpoints.
 18. The non-transitory computer-readable medium of claim 15,wherein the one or more instructions, that cause the device to theheadway score, cause the device to: determine, using a depth analysismodel, the distance between the first vehicle and the second vehiclebased on the subset of video frames, wherein the depth analysis modelhas been trained based on historical video data that depicts othervehicles and corresponding distance information associated with theother vehicles, wherein the other vehicles are a same vehicle type as avehicle type of the second vehicle.
 19. The non-transitorycomputer-readable medium of claim 15, wherein the one or moreinstructions, that cause the one or more processors to perform theaction, cause the one or more processors to: identify the vehicleidentifier based on an identifier that is associated with the video dataor the telematics data; and select, based on the vehicle identifierbeing mapped to a client device, the client device from a plurality ofclient devices, wherein a message is sent to the client device based onselecting the client device.
 20. The non-transitory computer-readablemedium of claim 15, wherein the video data and the telematics data areobtained from a storage device based on receiving, from a vehiclemonitoring system of the first vehicle, a link to the storage device,and wherein the one or more instructions, that cause the one or moreprocessors to perform the action, cause the one or more processors to:provide, to a client device, the headway score, the vehicle identifier,and the link to permit the client device to access the video data andthe telematics data.